package com.ee.chat.common.service;

import com.ee.chat.common.entity.UserOperationLog;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @Author Shane
 * @Date 2019/8/10 20:04
 */
public interface IGeneralService {
    /**
     * 获取行政区划（省、市）
     * @Author Shane
     * @Date 2019/8/10 20:08
     * @param
     * @return
     */
    List<Map<String, Object>> getAreaLibToCity();

    /**
     * 获取全国行政区划列表(省、市、区县)
     * @Author Shane
     * @Date 2019/8/13 9:29
     * @param
     * @return
     */
    List<Map<String, Object>> getAreaLib();

    /**
     * 获取新用户id
     * @Author Shane
     * @Date 2019/7/11 0:48
     * @param
     * @return
     */
    int getNewUserId();

    /**
     * 获取新用户邀请码
     * @Author Shane
     * @Date 2019/7/11 1:17
     * @param
     * @return
     */
    String getNewInviteCode();

    /**
     * 获取新的渠道码
     * @Author Shane
     * @Date 2020/2/16 18:32
     * @param
     * @return
     */
    String getNewChannelCode();

    Map<String, String> getLocationInfo(HttpServletRequest request) throws Exception;

    Map<String, String> handleInvite(HttpServletRequest request, String inviteCode, String channelCode) throws Exception;

    void handleInviteBind(HttpServletRequest request, Integer userId, String imei, String inviteCode, String channelCode, String ChannelCode2) throws Exception;

    /**
     * 登录用户推送20条免费消息通知
     * @Author Shane
     * @Date 2020/7/16 12:59
     * @param
     * @return
     */
    void sendFreeMsgInform(Integer userId) throws Exception;

    /**
     * 版本比较
     * @Author Shane
     * @Date 2020/7/16 10:33
     * @param
     * @return 大于返回1  等于返回0  小余返回-1
     */
    int versionCompare(String token, String androidAppVersion, String iosAppVersion) throws Exception;

    void addUserOperationLog(UserOperationLog userOperationLog, HttpServletRequest request) throws Exception;

    /**
     * 推送用户操作消息
     * @param message
     */
    void pushUserOperations(String channel, Map<String, Object> message);
}
